<template>
    <div>
        <el-menu default-active="2" class="el-menu-vertical-demo" 
        unique-opened router
            background-color="#ff6043" text-color="#fff" active-text-color="#ffd04b">
            <el-submenu index="99999">
                <template slot="title">
                    <i class="el-icon-house"></i>
                    <span>网站设置</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="99-1">基本设置</el-menu-item>
                </el-menu-item-group>
            </el-submenu>
            <el-submenu :index="index+''" v-for="item,index in menuList.menus" :key="index">
                <template slot="title">
                    <i :class="item.icon"></i>
                    <span>{{item.title}}</span>
                </template>
                <el-menu-item-group v-for="it,ind in item.children" :key="ind">
                    <el-menu-item :index="it.url">{{it.title}}</el-menu-item>
                </el-menu-item-group>
            </el-submenu>
        </el-menu>
    </div>
</template>

<script>
import { mapState } from 'vuex';
export default {

    data() {
        return {

        };
    },

    mounted() {
        console.log(this.menuList);
    },
    computed: {
        ...mapState('login', ['menuList'])
    },
    methods: {

    },
};
</script>

<style lang="scss" scoped>

</style>